﻿@namespace Masa.Blazor.Docs.Examples.components.alerts
@inherits Masa.Blazor.MAlert

@if (!_alert)
{
    <MButton Color="primary" OnClick="ShowAlert">reset</MButton>
}
else
{
    <MAlert Dense="Dense"
            Prominent="Prominent"
            Outlined="Outlined"
            Text="Text"
            Shaped="Shaped"
            Dismissible="Dismissible"
            Elevation="Elevation"
            Border="Border"
            Color="@Color"
            Icon="@Icon"
            Type="Type"
            Value="_alert"
            ValueChanged="(v) => _alert = v">
        @ChildContent
    </MAlert>
}

@code {

    private bool _alert = true;

    private void ShowAlert()
    {
        _alert = true;
    }

}
